//
//  PersonInfoViewController.m
//  Manage
//
//  Created by 杨康 on 2018/1/9.
//  Copyright © 2018年 杨康. All rights reserved.
//

#import "PersonInfoViewController.h"

@interface PersonInfoViewController ()

@end

@implementation PersonInfoViewController
-(void)viewWillAppear:(BOOL)animated
{
    [super viewWillAppear:animated];
    self.view.backgroundColor=[UIColor colorF];
}
- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view.
    self.navigationItem.title=@"个人信息";
    
    
    
    
    UIView *topView=[[UIView alloc]init];
    [self.view addSubview:topView];
    [topView mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.mas_equalTo(0);
        make.top.mas_equalTo(TOP_HEIGHT);
        make.size.mas_equalTo(CGSizeMake(SCREEN_WIDTH, 70));
    }];
    topView.backgroundColor=[UIColor whiteColor];
    
    UILabel *imageLab=[SingLeton myLabel:[UIColor colorWithHexString:@"222222"] andTitle:@"头像" andFont:14];
    [topView addSubview:imageLab];
    [imageLab mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.mas_equalTo(10);
        make.centerY.mas_equalTo(topView);
    }];
    
    
    UIImageView *headImg=[[UIImageView alloc]initWithImage:[UIImage imageNamed:@"默认头像"]];
    [topView addSubview:headImg];
    [headImg mas_makeConstraints:^(MASConstraintMaker *make) {
        make.right.mas_equalTo(-15);
        make.centerY.mas_equalTo(topView);
        make.size.mas_equalTo(CGSizeMake(50, 50));
    }];
    headImg.layer.masksToBounds=YES;
    headImg.layer.cornerRadius=25;
    
    
    UIView *passView=[[UIView alloc]init];
    [self.view addSubview:passView];
    [passView mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.mas_equalTo(0);
        make.top.mas_equalTo(topView.mas_bottom).mas_offset(15);
        make.size.mas_equalTo(CGSizeMake(SCREEN_WIDTH, 50));
    }];
    passView.backgroundColor=[UIColor whiteColor];
    
    
    UILabel *passLab=[SingLeton myLabel:[UIColor colorWithHexString:@"222222"] andTitle:@"修改密码" andFont:14];
    [passView addSubview:passLab];
    [passLab mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.mas_equalTo(10);
        make.centerY.mas_equalTo(passView);
    }];
    
    
    UIImageView *tipImg=[[UIImageView alloc]initWithImage:[UIImage imageNamed:@"箭头"]];
    [passView addSubview:tipImg];
    [tipImg mas_makeConstraints:^(MASConstraintMaker *make) {
        make.centerY.mas_equalTo(passView);
        make.right.mas_equalTo(-15);
    }];
    
    
    UIView *middleView=[[UIView alloc]init];
    [self.view addSubview:middleView];
    [middleView mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.mas_equalTo(0);
        make.top.mas_equalTo(passView.mas_bottom).mas_offset(15);
        make.size.mas_equalTo(CGSizeMake(SCREEN_WIDTH, 200));
    }];
    middleView.backgroundColor=[UIColor whiteColor];
    
    
    
    UILabel *nameLab=[SingLeton myLabel:[UIColor colorWithHexString:@"222222"] andTitle:@"昵称" andFont:14];
    [middleView addSubview:nameLab];
    [nameLab mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.mas_equalTo(10);
        make.centerY.mas_equalTo(middleView.mas_top).mas_offset(25);
    }];
    
    
    UILabel *nameLabel=[SingLeton myLabel:[UIColor color9] andTitle:@"杨康" andFont:14];
    [middleView addSubview:nameLabel];
    [nameLabel mas_makeConstraints:^(MASConstraintMaker *make) {
        make.right.mas_equalTo(-25);
        make.centerY.mas_equalTo(nameLab);
    }];
    
    
    
    
    UIImageView *tipImg1=[[UIImageView alloc]initWithImage:[UIImage imageNamed:@"箭头"]];
    [middleView addSubview:tipImg1];
    [tipImg1 mas_makeConstraints:^(MASConstraintMaker *make) {
        make.centerY.mas_equalTo(nameLab);
        make.right.mas_equalTo(-15);
    }];
    
    
    
    
    UILabel *sexLab=[SingLeton myLabel:[UIColor colorWithHexString:@"222222"] andTitle:@"性别" andFont:14];
    [middleView addSubview:sexLab];
    [sexLab mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.mas_equalTo(10);
//        make.top.mas_equalTo(nameLab.mas_bottom).mas_offset(40);
        make.centerY.mas_equalTo(middleView.mas_top).mas_offset(25+50);
        
    }];
    
    
    UILabel *sexLabel=[SingLeton myLabel:[UIColor color9] andTitle:@"请选择" andFont:14];
    [middleView addSubview:sexLabel];
    [sexLabel mas_makeConstraints:^(MASConstraintMaker *make) {
        make.right.mas_equalTo(-25);
        make.centerY.mas_equalTo(sexLab);
    }];
    
    
    
    
    UIImageView *tipImg2=[[UIImageView alloc]initWithImage:[UIImage imageNamed:@"箭头"]];
    [middleView addSubview:tipImg2];
    [tipImg2 mas_makeConstraints:^(MASConstraintMaker *make) {
        make.centerY.mas_equalTo(sexLab);
        make.right.mas_equalTo(-15);
    }];
    
    
    UILabel *timeLab=[SingLeton myLabel:[UIColor colorWithHexString:@"222222"] andTitle:@"生日" andFont:14];
    [middleView addSubview:timeLab];
    [timeLab mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.mas_equalTo(10);
//        make.top.mas_equalTo(sexLab.mas_bottom).mas_offset(40);
        make.centerY.mas_equalTo(middleView.mas_top).mas_offset(25+100);
        
    }];
    
    
    UILabel *timeLabel=[SingLeton myLabel:[UIColor color9] andTitle:@"1990-10-10" andFont:14];
    [middleView addSubview:timeLabel];
    [timeLabel mas_makeConstraints:^(MASConstraintMaker *make) {
        make.right.mas_equalTo(-25);
        make.centerY.mas_equalTo(timeLab);
    }];
    
    
    UIImageView *tipImg3=[[UIImageView alloc]initWithImage:[UIImage imageNamed:@"箭头"]];
    [middleView addSubview:tipImg3];
    [tipImg3 mas_makeConstraints:^(MASConstraintMaker *make) {
        make.centerY.mas_equalTo(timeLab);
        make.right.mas_equalTo(-15);
    }];
    
    UILabel *phoneLab=[SingLeton myLabel:[UIColor colorWithHexString:@"222222"] andTitle:@"手机号" andFont:14];
    [middleView addSubview:phoneLab];
    [phoneLab mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.mas_equalTo(10);
//        make.bottom.mas_equalTo(-26);
        make.centerY.mas_equalTo(middleView.mas_top).mas_offset(25+150);
        
    }];
    
    
    UILabel *phoneLabel=[SingLeton myLabel:[UIColor color9] andTitle:@"15925647872" andFont:14];
    [middleView addSubview:phoneLabel];
    [phoneLabel mas_makeConstraints:^(MASConstraintMaker *make) {
        make.right.mas_equalTo(-25);
        make.centerY.mas_equalTo(phoneLab);
    }];
    
    
    
    UIButton *quitButton=[UIButton buttonWithType:UIButtonTypeCustom];
    [self.view addSubview:quitButton];
    [quitButton mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.mas_equalTo(0);
        make.top.mas_equalTo(middleView.mas_bottom).mas_offset(15);
        make.size.mas_equalTo(CGSizeMake(SCREEN_WIDTH, 50));
    }];
    quitButton.backgroundColor=[UIColor whiteColor];
    quitButton.titleLabel.font=[UIFont systemFontOfSize:16];
    [quitButton setTitleColor:[UIColor colorWithHexString:@"222222"] forState:UIControlStateNormal];
    [quitButton setTitle:@"退出登录" forState:UIControlStateNormal];
    [quitButton addTarget:self action:@selector(quitAction) forControlEvents:UIControlEventTouchUpInside];
    
}
-(void)quitAction
{
 [NetworkPath leaveVC];
}
- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
